package com.henu.acmrating.service;

import com.henu.acmrating.dao.UserMapper;
import com.henu.acmrating.pojo.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserService {

    @Resource
    private UserMapper userMapper;


    public int deleteByPrimaryKey(Integer userId) {
        return userMapper.deleteByPrimaryKey(userId);
    }


    public int insert(User record) {
        return userMapper.insert(record);
    }


    public int insertOrUpdate(User record) {
        return userMapper.insertOrUpdate(record);
    }


    public int insertOrUpdateSelective(User record) {
        return userMapper.insertOrUpdateSelective(record);
    }


    public int insertSelective(User record) {
        return userMapper.insertSelective(record);
    }


    public User selectByPrimaryKey(Integer userId) {
        return userMapper.selectByPrimaryKey(userId);
    }


    public int updateByPrimaryKeySelective(User record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }


    public int updateByPrimaryKey(User record) {
        return userMapper.updateByPrimaryKey(record);
    }


    public int updateBatch(List<User> list) {
        return userMapper.updateBatch(list);
    }


    public int batchInsert(List<User> list) {
        return userMapper.batchInsert(list);
    }

    public User selectOneByUserAccount(String userAccount) {
        return userMapper.selectOneByUserAccount(userAccount);
    }

    public User selectOneByAll(User user) {
        return userMapper.selectOneByAll(user);
    }

    public User selectOneByUserEmail(String userEmail) {
        return userMapper.selectOneByUserEmail(userEmail);
    }


    public List<User> selectAll() {
        return userMapper.selectAll();
    }


    public int updateBatchSelective(List<User> list) {
        return userMapper.updateBatchSelective(list);
    }
}


